package com.tanhua.model.soul;

import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Data
public class ReportVo implements Serializable {
    private String conclusion;  //鉴定结果
    private String cover;  //鉴定图片
    private List<Dimensions> dimensions;
    private List<SimilarYou> similarYou;

    public void init(Report report){
        String dimensionsKey = report.getDimensionsKey();
        String dimensionsValue = report.getDimensionsValue();
        String[] split = dimensionsKey.split(",");
        String[] split1 = dimensionsValue.split(",");
        List<Dimensions> list=new ArrayList<>();
        for (int i = 0; i < split.length; i++) {
            Dimensions dimensions=new Dimensions();
            dimensions.setKey(split[i]);
            for (int i1 = 0; i1 < split1.length; i1++) {
                dimensions.setValue(split1[i]);
            }
            list.add(dimensions);
        }
        this.setDimensions(list);
    }

}
